package com.example.module_car.api

import com.example.lib_common.base.BaseViewModel
import com.example.lib_net.BaseResponse
import com.example.module_car.model.AddCarEntity
import com.example.module_car.model.AddCarParam
import com.example.module_car.model.CarEntityItem
import com.example.module_car.model.ProvincesEntity
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path


interface CarApiService {

    //查看车位
    @GET("/api/vehicles/{id}")
    suspend fun getQueryCarList(@Path("id") id : Int): BaseResponse<CarEntityItem>

    //31个省份
    @GET("/api/vehicles/getProvinces}")
    suspend fun getProvincesList(): BaseResponse<MutableList<ProvincesEntity>>

    //添加车位
    @POST("/api/vehicles")
    suspend fun getAddCar(@Body carParam: AddCarParam) : BaseResponse<AddCarEntity>

    @PUT("/api/vehicles/{id}")
    suspend fun upDateCar(@Path("id") id : Int, @Body param: AddCarParam) : BaseResponse<AddCarEntity>

}